package com.example.communitypro.pojo;

import java.io.Serializable;
import java.util.Date;

public class UserCollection implements Serializable {
    private Integer collectionNo;

    private Integer userNo;

    private Integer collectionObjectNo;

    private Integer collectionObjectType;

    private Date collectionTime;

    private static final long serialVersionUID = 1L;

    public Integer getCollectionNo() {
        return collectionNo;
    }

    public void setCollectionNo(Integer collectionNo) {
        this.collectionNo = collectionNo;
    }

    public Integer getUserNo() {
        return userNo;
    }

    public void setUserNo(Integer userNo) {
        this.userNo = userNo;
    }

    public Integer getCollectionObjectNo() {
        return collectionObjectNo;
    }

    public void setCollectionObjectNo(Integer collectionObjectNo) {
        this.collectionObjectNo = collectionObjectNo;
    }

    public Integer getCollectionObjectType() {
        return collectionObjectType;
    }

    public void setCollectionObjectType(Integer collectionObjectType) {
        this.collectionObjectType = collectionObjectType;
    }

    public Date getCollectionTime() {
        return collectionTime;
    }

    public void setCollectionTime(Date collectionTime) {
        this.collectionTime = collectionTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserCollection other = (UserCollection) that;
        return (this.getCollectionNo() == null ? other.getCollectionNo() == null : this.getCollectionNo().equals(other.getCollectionNo()))
                && (this.getUserNo() == null ? other.getUserNo() == null : this.getUserNo().equals(other.getUserNo()))
                && (this.getCollectionObjectNo() == null ? other.getCollectionObjectNo() == null : this.getCollectionObjectNo().equals(other.getCollectionObjectNo()))
                && (this.getCollectionObjectType() == null ? other.getCollectionObjectType() == null : this.getCollectionObjectType().equals(other.getCollectionObjectType()))
                && (this.getCollectionTime() == null ? other.getCollectionTime() == null : this.getCollectionTime().equals(other.getCollectionTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCollectionNo() == null) ? 0 : getCollectionNo().hashCode());
        result = prime * result + ((getUserNo() == null) ? 0 : getUserNo().hashCode());
        result = prime * result + ((getCollectionObjectNo() == null) ? 0 : getCollectionObjectNo().hashCode());
        result = prime * result + ((getCollectionObjectType() == null) ? 0 : getCollectionObjectType().hashCode());
        result = prime * result + ((getCollectionTime() == null) ? 0 : getCollectionTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", collectionNo=").append(collectionNo);
        sb.append(", userNo=").append(userNo);
        sb.append(", collectionObjectNo=").append(collectionObjectNo);
        sb.append(", collectionObjectType=").append(collectionObjectType);
        sb.append(", collectionTime=").append(collectionTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}